import { MediaSelectionProvider } from '@/contexts/MediaSelectionContext';
import { Stack } from "expo-router";
import { StatusBar } from "expo-status-bar";
import { LogBox } from 'react-native';
import { GestureHandlerRootView } from "react-native-gesture-handler";

// 禁用 Reanimated 的严格模式警告
LogBox.ignoreLogs([
  '[Reanimated] Reading from `value` during component render',
  'Reading from `value` during component render',
  '[Reanimated]',
]);

export default function RootLayout() {
  return (
    <GestureHandlerRootView style={{ flex: 1 }}>
      <MediaSelectionProvider>
        <Stack>
          <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
          <Stack.Screen name="detail" options={{headerShown: true}}/>
          <Stack.Screen name="+not-found" />
        </Stack>
        <StatusBar style="dark" />
      </MediaSelectionProvider>
    </GestureHandlerRootView>
  );
}
